<?php
namespace App\Models\Traits\Relation\Seek;

use App\Models\Seek\Clud;
use App\Models\Seek\FindImages;
use App\Models\User\Users;
use App\Models\Common\Area;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

Trait FindNoticeRelation{

    public function clud()
    {
        return $this->hasOne(Clud::class, 'nid');
    }

    public function users()
    {
        return $this->belongsTo(Users::class, "release_user");
    }

    public function findimages()
    {
        return $this->hasMany(FindImages::class, "out_id");
    }

    public function prov()
    {
        return $this->belongsTo(Area::class, 'province');
    }

    public function cityArr()
    {
        return $this->belongsTo(Area::class, 'city');
    }

    public function areaArr()
    {
        return $this->belongsTo(Area::class, 'area');
    }

}